import datetime

import clear_data
import generator_file_from_template
import get_exchange_rate_from_mp_item
import get_last_ten_urls_mp
import os


# 抓取数据的主方法
def main():
    # # 获取最新10个的
    get_last_ten_urls_mp.main()
    #
    # # 抓取数据
    get_exchange_rate_from_mp_item.main()
    #
    # # 清洗数据
    clear_data.main()
    #
    # # 生成文件
    generator_file_from_template.main()

    f = os.popen("cd /Users/alexxiao/Documents/gits/9527y/exchange-rate/frontend && sh run.sh")
    print(f.read())
    print(datetime.date.today())

    # print(os.system("cd /Users/alexxiao/Documents/gits/9527y/exchange-rate/frontend && sh run.sh"))


if __name__ == "__main__":
    main()
